#格式化输出
name_1="张三"
name_2="李四"
p_1="甘肃省"
p_2="北京"
print("{}与{}是好朋友！".format(name_1,name_2))
print("{0}与{1}是好朋友！".format(name_1,name_2))
print("{1}与{0}是好朋友！".format(name_1,name_2))
#对齐
print("{}来自{}！".format(name_1,p_1))
print("{}来自{}！".format(name_2,p_2))
print("<----------右对齐--------->")
print("{:>12}来自{:<7}！".format(name_1,p_1))
print("{:>12}来自{:<7}！".format(name_2,p_2))
print("<----------居中对齐--------->")
print("{:^12}来自{}！".format(name_1,p_1))
print("{:^12}来自{}！".format(name_2,p_2))
print("<----------左对齐--------->")
print("{:<12}来自{:>7}！".format(name_1,p_1))
print("{:<12}来自{:>7}！".format(name_2,p_2))
print("<----------填充--------->")
print("{:*^12}来自{}！".format(name_1,p_1))
print("{:#^12}来自{}！".format(name_2,p_2))
